package org.pucc.hive

import java.util

import org.apache.flink.table.api.{EnvironmentSettings, TableEnvironment}
import org.apache.flink.table.catalog.hive.HiveCatalog

object HiveTest extends App{
  val map = new util.HashMap

//  val settings = EnvironmentSettings.newInstance().build()
//  val tableEnv = TableEnvironment.create(settings)
//
//  val name            = "myhive"
//  val defaultDatabase = "default"
//  val hiveConfDir     = "E:\\IDEAProjects\\gl_dataspace_etl\\src\\main\\resources\\hive-conf"
//
//  val hive = new HiveCatalog(name, defaultDatabase, hiveConfDir)
//  tableEnv.registerCatalog("myhive", hive)
//
//  // set the HiveCatalog as the current catalog of the session
//  tableEnv.useCatalog("myhive")
//
//  tableEnv.listTables().foreach(println(_))
//
//  tableEnv.executeSql(
//    """
//      |select * from dept_partition_1
//      |""".stripMargin).print

}
